-- GENERATED SPELL FOR [Vim'gol the Vile] --


function spell0_22911(pUnit, Event) --@Summoned Demon,Self--
pUnit:FullCastSpellOnTarget(7741,pUnit)
pUnit:RegisterEvent('Sorts_22911', 649, 1)
end

function spell1_22911(pUnit, Event) --@Unholy Growth,Self--
pUnit:FullCastSpellOnTarget(40545,pUnit)
pUnit:RegisterEvent('Sorts_22911', 10000, 1)
end

function Sorts_22911(pUnit, Event)
local choix_sorts_22911 = math.random(0, 1)
if choix_sorts_22911 == 0 then
pUnit:RegisterEvent('spell0_22911', 1, 1)
end
if choix_sorts_22911 == 1 then
pUnit:RegisterEvent('spell1_22911', 1, 1)
end
end

function mob22911_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22911', math.random(1500, 3000), 1)
end

function mob22911_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22911_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22911_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22911, 1, 'mob22911_Action')
RegisterUnitEvent(22911, 2, 'mob22911_Leave')
RegisterUnitEvent(22911, 3, 'mob22911_Kill')
RegisterUnitEvent(22911, 4, 'mob22911_Die')
